package com.boot.security.model.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.boot.persistence.model.AssociationModel;
import com.boot.security.model.SystemModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@SuperBuilder
@NoArgsConstructor
@TableName("tb_user_access")
public class UserAccess extends SystemModel implements AssociationModel<Long, Long, Long> {

    private Long userId;

    private Long accessId;

    @Override
    public Long mid() {
        return userId;
    }

    @Override
    public void setMid(Long mid) {
        userId = mid;
    }

    @Override
    public Long nid() {
        return accessId;
    }

    @Override
    public void setNid(Long nid) {
        accessId = nid;
    }
}
